import request from '@/utils/request.js'

// 登录
export const login = (data) => {
	return request({
		url: '/user/authorize',
		data,
		method: "POST",
	})
}

// 获取用户信息
export const getUserInfo = () => {
	return request({
		url: '/user/info',
		method: "GET",
	})
}

// 获取项目列表
export const getProject = () => {
	return request({
		url: '/project',
		method: "GET",
	})
}

// 提交申请
export const submitUser = (data) => {
	return request({
		url: '/user/apply',
		method: "POST",
		data
	})
}

// 修改
export const updateUser = (data) => {
	return request({
		url: '/user/update',
		method: "POST",
		data
	})
}

// 获取通知
export const getNotice = (data) => {
	return request({
		url: '/message',
		method: "GET",
		data
	})
}

// 离职
export const postDimission = (data) => {
	return request({
		url: '/user/leave',
		method: "POST",
		data
	})
}